package com.ruoyi.lclook.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lclook.mapper.LcVideoMapper;
import com.ruoyi.lclook.domain.LcVideo;
import com.ruoyi.lclook.service.ILcVideoService;

/**
 * 产品视频Service业务层处理
 * 
 * @author Choi
 * @date 2021-08-07
 */
@Service
public class LcVideoServiceImpl implements ILcVideoService 
{
    @Autowired
    private LcVideoMapper lcVideoMapper;

    /**
     * 查询产品视频
     * 
     * @param id 产品视频ID
     * @return 产品视频
     */
    @Override
    public LcVideo selectLcVideoById(Long id)
    {
        return lcVideoMapper.selectLcVideoById(id);
    }

    /**
     * 查询产品视频列表
     * 
     * @param lcVideo 产品视频
     * @return 产品视频
     */
    @Override
    public List<LcVideo> selectLcVideoList(LcVideo lcVideo)
    {
        return lcVideoMapper.selectLcVideoList(lcVideo);
    }

    /**
     * 新增产品视频
     * 
     * @param lcVideo 产品视频
     * @return 结果
     */
    @Override
    public int insertLcVideo(LcVideo lcVideo)
    {
        lcVideo.setCreateTime(DateUtils.getNowDate());
        return lcVideoMapper.insertLcVideo(lcVideo);
    }

    /**
     * 修改产品视频
     * 
     * @param lcVideo 产品视频
     * @return 结果
     */
    @Override
    public int updateLcVideo(LcVideo lcVideo)
    {
        lcVideo.setUpdateTime(DateUtils.getNowDate());
        return lcVideoMapper.updateLcVideo(lcVideo);
    }

    /**
     * 批量删除产品视频
     * 
     * @param ids 需要删除的产品视频ID
     * @return 结果
     */
    @Override
    public int deleteLcVideoByIds(Long[] ids)
    {
        return lcVideoMapper.deleteLcVideoByIds(ids);
    }

    /**
     * 删除产品视频信息
     * 
     * @param id 产品视频ID
     * @return 结果
     */
    @Override
    public int deleteLcVideoById(Long id)
    {
        return lcVideoMapper.deleteLcVideoById(id);
    }
}
